package com.yssoft.mapper.core;

import com.yssoft.entity.core.TDepartment;
import com.yssoft.entity.core.TSemiFinishedGoods;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;

public interface TSemiFinishedGoodsMapper  extends Mapper<TSemiFinishedGoods> {
    /**
     * 条件查询半成品信息
     * @param params
     * @return
     */
    List<TSemiFinishedGoods> querySemiFinishedGoodsPage(Map<String,Object> params);
    
    /**
     * 条件查询半成品个数
     * @param params
     * @return
     */
    int querySemiFinishedGoodsCount(Map<String,Object> params);

    /**
     * 新增保存半成品
     * @param entity
     */
	void insertSelectiveById(TSemiFinishedGoods entity);

	/**
	 * 新增保存半成品和物料中间表
	 * @param id
	 * @param s
	 */
	void insertTMaterial(@Param(value="id")Integer id, @Param(value="s")Integer s);

	/**
	 * 根据半成品id删除物料关联数据
	 * @param id
	 */
	void deleteTMaterialById(Integer id);

	/**
	 * 根据半成品与物料id删除中间数据
	 * @param sId
	 * @param mId
	 */
	void delSemMater(List<Map<String,Object>> list);

	/**
	 * 根据半成品与物料id添加中间数据
	 * @param sId
	 * @param mIds
	 */
	void insSemMater(List<Map<String,Object>> list);
}